<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Client</title>
</head>
<body>
	<script>
		let ifr = document.createElement('iframe');
		ifr.style.display = 'none';
		ifr.src = "http://localhost:8081/data.html#data";
		document.body.appendChild(ifr);
		
		function checkHash() {
			try {
				let data = location.hash ? location.hash.substring(1) : '';
				console.log('获得到的数据是：', data);
			}catch(e) {

			}
		}
		window.addEventListener('hashchange', function(e) {
			console.log('获得的数据是：', location.hash.substring(1));
		});
	</script>
</body>
</html>